//
//  Home_ZP_03TableViewCell.m
//  
//
//  Created by dllo on 16/8/11.
//
//

#import "Home_ZP_03TableViewCell.h"
#import "HomePage.h"

@interface Home_ZP_03TableViewCell()
@property (nonatomic, retain) UILabel *titleLabel;
@property (nonatomic, retain) UILabel *wordLabel;
@property (nonatomic, retain) UILabel *liftLabel;
@property (nonatomic, retain) UIImageView *imageview;

@end

@implementation Home_ZP_03TableViewCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.imageview = [[UIImageView alloc]init];
        self.imageview.image = [UIImage imageNamed:@"bjtp.png"];
        [self.contentView addSubview:_imageview];
        
        
        
        self.titleLabel = [[UILabel alloc]init];
        [self.imageview addSubview:_titleLabel];
        
        self.wordLabel = [[UILabel alloc]init];
        [self.imageview addSubview:_wordLabel];
        
        self.liftLabel = [[UILabel alloc]init];
        [self.imageview addSubview:_liftLabel];
        
        
        
        
        
    }
    return  self;
}


-(void)layoutSubviews{
    [super layoutSubviews];
    self.imageview.frame = self.contentView.bounds;
    
    self.titleLabel.frame = CGRectMake(self.contentView.frame.size.height/8, self.contentView.frame.size.height/8, self.contentView.frame.size.width, self.contentView.frame.size.height/4);
    self.titleLabel.font = [UIFont boldSystemFontOfSize:20];
    
    self.wordLabel.frame = CGRectMake(self.contentView.frame.size.width/5*3, self.contentView.frame.size.height/2, self.contentView.frame.size.width/2, self.contentView.frame.size.height/4);
    self.wordLabel.textColor = [UIColor redColor];
    
    self.liftLabel.frame = CGRectMake(self.contentView.frame.size.height/8, self.contentView.frame.size.height/2, self.contentView.frame.size.width, self.contentView.frame.size.height/2);
    self.liftLabel.textColor = [UIColor grayColor];
    
}



-(void)setModel:(HomePage *)model{
    _model = model;
    
    self.titleLabel.text = _model.title;
    self.wordLabel.text = _model.right_keyword;
    self.liftLabel.text = _model.left_keyword;
    
    
    
    
    
}

@end
